<!doctype html>
<html <?php language_attributes(); ?>>
<head>

<meta charset="<?php bloginfo( 'charset' ); ?>">

<title><?php if (is_home() || is_front_page()) { echo bloginfo('name'); } else { echo wp_title(''); } ?></title>

<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php echo (themify_check('setting-custom_feed_url')) ? themify_get('setting-custom_feed_url') : bloginfo('rss2_url'); ?>">

<?php
/**
 *  Stylesheets and Javascript files are enqueued in theme-functions.php
 */
?>

<!-- wp_header -->
<?php wp_head(); ?>

<!-- audio player -->
<script type="text/javascript">
	AudioPlayer.setup("<?php echo get_template_directory_uri(); ?>/player.swf", {
		width: '90%',
		transparentpagebg: 'yes'
	});
</script>

</head>

<body <?php body_class(); ?>>

<div id="pagewrap">

	<div id="headerwrap">
	
		<header id="header" class="pagewidth">
			<hgroup>
				<?php if(themify_get('setting-site_logo') == 'image' && themify_check('setting-site_logo_image_value')){ ?>
					<?php themify_image("src=".themify_get('setting-site_logo_image_value')."&w=".themify_get('setting-site_logo_width')."&h=".themify_get('setting-site_logo_height')."&alt=".get_bloginfo('name')."&before=<div id='site-logo'><a href='".get_option('home')."'>&after=</a></div>"); ?>
				<?php } else { ?>
					 <h1 id="site-logo"><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></h1>
				<?php } ?>
	
				<h2 id="site-description"><?php bloginfo('description'); ?></h2>
			</hgroup>
	
            <div id="main-nav-wrap">
                <div id="menu-icon" class="mobile-button"></div>
                <nav>
                    <?php if (function_exists('wp_nav_menu')) {
                        wp_nav_menu(array('theme_location' => 'main-nav' , 'fallback_cb' => 'default_main_nav' , 'container'  => '' , 'menu_id' => 'main-nav' , 'menu_class' => 'main-nav'));
                    } else {
                        default_main_nav();
                    } ?>
                    <!-- /#main-nav --> 
                </nav>
			</div>
            <!-- /#main-nav-wrap -->
	    
	<?php if(!themify_check('setting-exclude_search_form')): ?>
            <div id="searchform-wrap">
                <div id="search-icon" class="mobile-button"></div>
                    <?php get_search_form(); ?>
            </div>
            <!-- /#searchform-wrap -->
	<?php endif ?>
	  
			<div class="social-widget">
				<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Social_Widget') ) ?>
	
				<?php if(!themify_check('setting-exclude_rss')): ?>
					<div class="rss"><a href="<?php if(themify_get('setting-custom_feed_url') != ""){ echo themify_get('setting-custom_feed_url'); } else { echo bloginfo('rss2_url'); } ?>">RSS</a></div>
				<?php endif ?>
			</div>
			<!-- /.social-widget -->

		</header>
		<!-- /#header -->
				
		<div id="nav-bar">
		</div>
		<!-- /nav-bar -->

	</div>
	<!-- /#headerwrap -->
	
	<div id="body" class="clearfix"> 
